package com.liezh.bridge;

import com.liezh.bridge.could.OSSFileUploadExcutor;
import com.liezh.bridge.local.FtpFileUploadExcutor;
import com.liezh.bridge.local.LoaclFileUploaderImpl;

/**
 * @author liezh
 * @date 2021-9-2
 */
public class Client {

    public static void main(String[] args) {
        // FileUploadExcutor行为
        FileUploadExcutor excutor = new OSSFileUploadExcutor();
        // 实体
        FileUploader fileUploader = new SimpleFileUploaderImpl(excutor);
        fileUploader.upload("/imag", new Object());

        FileUploadExcutor excutor1 = new FtpFileUploadExcutor();
        FileUploader fileUploader1 = new LoaclFileUploaderImpl(excutor1);
        fileUploader1.delete("11111");

        FileUploadExcutor excutor2 = new FtpFileUploadExcutor();
        FileUploader fileUploader2 = new SimpleFileUploaderImpl(excutor2);
        fileUploader2.delete("11111");
    }

}
